<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.7"/>
<title>AES-API: E:/Other/Gitee/components-examples/A01-AES/exam/aes/aes.h 文件参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="gzh (2).jpg"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">AES-API
   &#160;<span id="projectnumber">V1.0.0</span>
   </div>
   <div id="projectbrief">AES-API</div>
  </td>
   <td>        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="搜索" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
</td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.7 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('aes_8h.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>全部</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>文件</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>函数</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>变量</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>宏定义</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#define-members">宏定义</a> &#124;
<a href="#func-members">函数</a>  </div>
  <div class="headertitle">
<div class="title">aes.h 文件参考</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &lt;stdint.h&gt;</code><br />
<code>#include &lt;stdlib.h&gt;</code><br />
</div>
<p><a href="aes_8h_source.html">浏览源代码.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
宏定义</h2></td></tr>
<tr class="memitem:a22342c953c4b0072cb2e0a8a4e686253"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="aes_8h.html#a22342c953c4b0072cb2e0a8a4e686253">gmult</a>(a, b)&#160;&#160;&#160;<a class="el" href="gmult_8h.html#a985dad9241346475b94788f4ec6ae5d3">gmult_aes</a>[256*a + b]</td></tr>
<tr class="separator:a22342c953c4b0072cb2e0a8a4e686253"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
函数</h2></td></tr>
<tr class="memitem:a5682ceb1811499fe30fbe705877ff32c"><td class="memItemLeft" align="right" valign="top">uint8_t *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="aes_8h.html#a5682ceb1811499fe30fbe705877ff32c">aes_init</a> (size_t key_size)</td></tr>
<tr class="memdesc:a5682ceb1811499fe30fbe705877ff32c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize AES variables and allocate memory for expanded key.  <a href="#a5682ceb1811499fe30fbe705877ff32c">更多...</a><br /></td></tr>
<tr class="separator:a5682ceb1811499fe30fbe705877ff32c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a461739b060263bfe2888f4a47d8f5186"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="aes_8h.html#a461739b060263bfe2888f4a47d8f5186">aes_key_expansion</a> (uint8_t *key, uint8_t *w)</td></tr>
<tr class="memdesc:a461739b060263bfe2888f4a47d8f5186"><td class="mdescLeft">&#160;</td><td class="mdescRight">Key Expansion.  <a href="#a461739b060263bfe2888f4a47d8f5186">更多...</a><br /></td></tr>
<tr class="separator:a461739b060263bfe2888f4a47d8f5186"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a73d0f24db5e8c95eaf2b6c1979188b50"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="aes_8h.html#a73d0f24db5e8c95eaf2b6c1979188b50">aes_inv_cipher</a> (uint8_t *in, uint8_t *out, uint8_t *w)</td></tr>
<tr class="memdesc:a73d0f24db5e8c95eaf2b6c1979188b50"><td class="mdescLeft">&#160;</td><td class="mdescRight">Performs the AES inverse cipher operation.  <a href="#a73d0f24db5e8c95eaf2b6c1979188b50">更多...</a><br /></td></tr>
<tr class="separator:a73d0f24db5e8c95eaf2b6c1979188b50"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5d8ac3ac83810baa35fa15c5e4b25303"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="aes_8h.html#a5d8ac3ac83810baa35fa15c5e4b25303">aes_cipher</a> (uint8_t *in, uint8_t *out, uint8_t *w)</td></tr>
<tr class="memdesc:a5d8ac3ac83810baa35fa15c5e4b25303"><td class="mdescLeft">&#160;</td><td class="mdescRight">Performs the AES cipher operation.  <a href="#a5d8ac3ac83810baa35fa15c5e4b25303">更多...</a><br /></td></tr>
<tr class="separator:a5d8ac3ac83810baa35fa15c5e4b25303"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">宏定义说明</h2>
<a class="anchor" id="a22342c953c4b0072cb2e0a8a4e686253"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define gmult</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">a, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">b&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>&#160;&#160;&#160;<a class="el" href="gmult_8h.html#a985dad9241346475b94788f4ec6ae5d3">gmult_aes</a>[256*a + b]</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<h2 class="groupheader">函数说明</h2>
<a class="anchor" id="a5d8ac3ac83810baa35fa15c5e4b25303"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void aes_cipher </td>
          <td>(</td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>in</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>out</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>w</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Performs the AES cipher operation. </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">*in</td><td>明文 </td></tr>
    <tr><td class="paramname">*out</td><td>加密后的密文 </td></tr>
    <tr><td class="paramname">*w</td><td>扩展后的密钥 </td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>返回值</dt><dd>
  <table class="retval">
    <tr><td class="paramname"></td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a5682ceb1811499fe30fbe705877ff32c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint8_t* aes_init </td>
          <td>(</td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>key_size</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initialize AES variables and allocate memory for expanded key. </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">key_size</td><td>密钥的字节数 </td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>返回值</dt><dd>
  <table class="retval">
    <tr><td class="paramname"></td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a73d0f24db5e8c95eaf2b6c1979188b50"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void aes_inv_cipher </td>
          <td>(</td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>in</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>out</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>w</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Performs the AES inverse cipher operation. </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">*in</td><td>密文 </td></tr>
    <tr><td class="paramname">*out</td><td>密文的逆 </td></tr>
    <tr><td class="paramname">*w</td><td>扩展后的密钥 </td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>返回值</dt><dd>
  <table class="retval">
    <tr><td class="paramname"></td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a461739b060263bfe2888f4a47d8f5186"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void aes_key_expansion </td>
          <td>(</td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>key</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>w</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Key Expansion. </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">*key</td><td>密钥 </td></tr>
    <tr><td class="paramname">*w</td><td>密钥编排结果 </td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>返回值</dt><dd>
  <table class="retval">
    <tr><td class="paramname"></td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_afe89f749343fa812f00a025feac441b.html">exam</a></li><li class="navelem"><a class="el" href="dir_b795f7569447f4537a033ae9f8381a99.html">aes</a></li><li class="navelem"><a class="el" href="aes_8h.html">aes.h</a></li>
    <li class="footer">生成于 2022年 二月 16日 星期三 07:13:25 , 为 AES-API使用 
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.7 </li>
  </ul>
</div>
</body>
</html>
